{* $Id: 20110317 *}
{if $pv.json eq 1}{$pv.data_json}{else}
{include file="default/admin/inc_navmenu.tpl"}
<div id="tk-{$action}-{$req.get.act}" class="tk-admin-act">
        {if $req.get.act eq 'additem'}
    	{include file="default/admin/inc_formmain.tpl"}
    {/if}
    {if $req.get.act eq 'manitem'}
	    {if is_array($pv.search)}
	    	{include file="default/admin/inc_formsearch.tpl"}
	    {/if}
	<div id="pager_here" class="clear span-19 last m-b-10">
    </div>
    <table cellpadding="0" cellspacing="0" class="clear ba-solid bc-ccc mf-a" id="tk-{$action}-datatable">
        <tr bgcolor="#cae5FF">
            <th class="width-50 border center">
                No
            </th>
            <th class="width-200 border">
                {$lang.$action.title}
            </th>
            <th class="width-50 border center">
                {$lang.edit}
            </th>
            <th class="width-35 border center">
                {$lang.delete}
            </th>
            <th class="width-35 center">
                {$lang.active_passive}
            </th>
        </tr>
        {foreach $pv.data.list as $item}
        <tr class="elements" bgcolor="{cycle values="#eeeeee,#dcdcdc"}">
            <td class="width-50 border center">
                {$item.id}
            </td>
            <td class="width-200 border">
                {$item.title}
            </td>
            <td class="width-50 border center">
                <input type="button" name="edit" class="sprite-icons sprite-pencil edit-input tk-trigger" tk-value="{$item.id}" />
            </td>
            <td class="width-35 border center">
                <input type="button" name="delete" class="sprite-icons sprite-delete delete-input tk-trigger" tk-value="{$item.id}" />
            </td>
            <td class="width-35 center">
                {if $item.status != 0}<input type="button" name="edit" class="sprite-icons active-input edit-status tk-trigger" tk-value="{$item.id}" /> {else}<input type="button" name="edit" class="sprite-icons inactive-input edit-status tk-trigger" tk-value="{$item.id}" /> {/if}
            </td>
        </tr> {/foreach}
    </table>
</div><!-- edit part -->
{assign var=actionfile value="templates/default/admintmpl/`$action`.tpl"}
{if is_file($actionfile)}
{include file="$actionfile"}
{/if}

<div id="tk-{$action}-edititem" class="tk-admin-act hide">
	{include file="default/admin/inc_formmain.tpl"}
</div>
{/if}{* manitem *}
{/if}